
import 'package:flutter/material.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';

class YBWorkTaiGongGaoProvider with ChangeNotifier{

  List _gongGaoList = List();

  RefreshController _easyRefreshController =  RefreshController();

  List get gongGaoInfoList => _gongGaoList;

  RefreshController get easyController => _easyRefreshController;

  int page;

  void getGongGaoRefresh (){
    page = 1;
    getGongGaoInfo(page);
  }

  void getGongGaoLoadRefresh(){
    page++;
    getGongGaoInfo(page);
  }

  void getGongGaoInfo(int page){


    if (page == 1) {
       _gongGaoList.clear();
    }
    _easyRefreshController.loadComplete();
    _easyRefreshController.refreshCompleted();

    notifyListeners();
  }

}
